<template>
	<view class="fun-view">
		<!-- 1，左侧便民服务 -->
		<view class="con">
			<view class="con-con">
				<view class="con-title bmfw">
					<text>便民服务</text>
				</view>
				<view v-for="(item,index) in leftList" :key="index">
					<view class="con-box" @click="gotoDetail(item)">
						<view class="con-box-img">
							<image :src="item.img"></image>
						</view>
						<view class="con-box-text">
							<view class="con-box-text-title">
								<text>{{item.text}}</text>
							</view>
							<view class="con-box-text-tips">
								<text>{{item.tips}}</text>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>

		<!-- 2，右侧生活服务 -->
		<view class="con">
			<view class="con-con">
				<view class="con-title shfw">
					<text>生活服务</text>
				</view>
				<view v-for="(item,index) in rightList" :key="index">
					<view class="con-box" @click="gotoDetail(item)">
						<view class="con-box-img">
							<image :src="item.img"></image>
						</view>
						<view class="con-box-text">
							<view class="con-box-text-title">
								<text>{{item.text}}</text>
							</view>
							<view class="con-box-text-tips">
								<text>{{item.tips}}</text>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		bmfwList,
		shfwList
	} from '@/local_data/main/home.js'

	export default {
		data() {
			return {
				leftList: bmfwList,
				rightList: shfwList,
			}
		},
		onLoad() {
			//console.log(bmfwList)
		},
		methods: {
			gotoDetail(item) {
				// this.$isLoginByVisitor()
				// if(uni.getStorageSync('isVisitorLogin')){
				// 	return
				// }
				
				uni.navigateTo({
					url: '/subpkg/main/home/release-detail/release-detail?reqObject=' + JSON.stringify(item)
				})
				//console.log(item)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.fun-view {
		width: 100%;
		// height: 200rpx;
		background-image: linear-gradient(to bottom, #23D754 0%, #F6F6F6 100%);
		display: flex;
		// margin-top: 30rpx;

		// margin-bottom: 30rpx;
		.con {
			width: 50%;

			.con-con {
				background-color: #fff;
				width: 80%;
				margin-left: 10%;
				border-radius: 30rpx;
				box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);

				.con-title {
					height: 100rpx;
					border-radius: 30rpx 30rpx 0 0;
					line-height: 100rpx;
					color: #fff;

					text {
						margin-left: 20rpx;
						font-size: 32rpx;
					}
				}

				.con-box {
					height: 100rpx;
					display: flex;

					&:active {
						background-color: #eee;
					}

					.con-box-img {
						image {
							width: 50rpx;
							height: 50rpx;
							margin: 25rpx;
						}
					}

					.con-box-text {
						.con-box-text-title {
							height: 60rpx;
							font-size: 30rpx;
							line-height: 60rpx;
						}

						.con-box-text-tips {
							height: 40rpx;
							line-height: 20rpx;
							font-size: 22rpx;
							color: #BEBCBD;
						}
					}
				}

				.bmfw {
					background-color: #FFBF3F;
				}

				.shfw {
					background-color: #1296db;
				}
			}




			// height: 400rpx;


		}
	}
</style>
